import Vue from "vue";
import Vuex from "vuex";
import user from "./user";
import address from "./address";
import persistence from "vuex-uniapp-persistence";
Vue.use(Vuex);
const store = new Vuex.Store({
  plugins: [persistence()],
  state: {
    // 小程序顶部的安全区
    safeArea: uni.getWindowInfo().safeArea,
    capsule: uni.getMenuButtonBoundingClientRect(),
    // 设备详情
    platform:uni.getSystemInfoSync().platform
  },
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    user,
    address,
  },
});
export default store;
